#!/bin/bash

# 检查CUPS是否已安装
if rpm -q cups >/dev/null 2>&1; then
    echo "[-] 检测失败: CUPS已安装"
    
    # 显示已安装的cups相关包
    echo "    已安装的CUPS相关包:"
    rpm -qa | grep cups | sed 's/^/    /'
    
    # 检查服务状态
    if systemctl is-active cups >/dev/null 2>&1; then
        echo "    cups服务正在运行"
    fi
    
    exit 1
else
    echo "[+] 检测通过: CUPS未安装"
    exit 0
fi

